package com.itheima.text4;

import java.io.*;
import java.net.Socket;
import java.util.Scanner;

public class TCPSocket {
    public static void main(String[] args) throws IOException {
        Socket s = new Socket("192.168.23.64", 10004);
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(
                s.getOutputStream()
        ));
        Scanner sc = new Scanner(System.in);
        String line;
        while ((line = sc.nextLine()) != null) {

            if ("over".equals(line)) {
                break;
            }

            bw.write(line);
            bw.newLine();
            bw.flush();
        }
    }
}
